import Vue from 'vue'
import Vuex from 'vuex'
import nav from './modules/nav'
import VuexPersistence from 'vuex-persist'
import user from './modules/user'
const vuexLocal = new VuexPersistence({
  storage: window.sessionStorage,
  reducer: (state) => ({ nav: state.nav })
})
Vue.use(Vuex)
export default new Vuex.Store({
  strict: true,
  modules: {
    nav,
    user
  },
  plugins: [vuexLocal.plugin]
})
